<script>
    $(document).ready(function(){
        $("#order_id").change(function(){
            var id=$(this).val();
            var dataString="";
            $.ajax({
                type: "POST",
                        
                url: base_url+"index.php/main/member/cari_biaya/"+id,
                data: dataString,
                cache: false,
                success: function(html){
                    $("#nominal").val(html);
                } 
            });
        
        });
        
    });
</script>


<div class="twelve columns">
    <div class="box_head">
        <h3><?php echo $title; ?></h3>
    </div>
    <div class="member">
        <p>Silahkan isi form di bawah ini apabila anda ingin mengubah alamat masuk kedalam website ini.</p>
        <?php
        if ($alert == "13") {
            ?>
            <section id="tagLine" class="clearfix">
                <div class="twelve columns">
                    <h5>
                        Sukses !!!  <br>
                        <small>Konfirmasi pemesanan anda akan kami proses.</small>
                    </h5>
                </div>
            </section>
        <?php } ?>

        <form style="margin-left: 10px;"  id="formID" class = "formular" method="post" action="<?php echo base_url() . "main/member/save_konfirmasi_transfer" ?>">
            <div class="five columns">
                <p> <b> Order ID </b><br/>
                    <select name="order_id" id="order_id" class="validate[required] text-input">
                        <option value="">Pilih Order ID</option>
                        <?php
                        $tgl1 = date('Y-m-d'); // 1 Oktober 2010

                        $pecah1 = explode("-", $tgl1);
                        $date1 = $pecah1[2];
                        $month1 = $pecah1[1];
                        $year1 = $pecah1[0];

                        foreach ($list_pemesanan as $dtaa) {
                            $tgl2 = $dtaa->date; // 10 Oktober 2010
                            $date2 = substr($tgl2, 8, 2);
                            $month2 = substr($tgl2, 5, 2);
                            $year2 = substr($tgl2, 0, 4);

                            $jd1 = GregorianToJD($month1, $date1, $year1);
                            $jd2 = GregorianToJD($month2, $date2, $year2);

                            //pengurangan jadi nilai hari
                            $selisih = $jd1 - $jd2;

                            if ($dtaa->status == 0 and $selisih <= 2) {
                                echo "<option value='$dtaa->id'> $dtaa->id </option>";
                            }
                        }
                        ?>
                    </select>
                </p>

                <p> <b> Jumlah Nominal Transfer</b><br/>
                    <input type="text"  name="nominal" id="nominal" class="validate[required] text-input" style="text-align: right;"/>
                </p>    

                <p> <b> Tanggal Transfer Pembayaran </b><br/>
                    <input type="text" name="tgl_transfer"  id="tanggal" class="validate[required] text-input"/>
                </p> 
                <p> <b> Dari Bank </b><br/>
                    <select name="nama_bank" id="nama_bank" class="validate[required] text-input">
                        <option value="">Pilih Nama Bank</option>
                        <option value="Bank Mandiri">Bank Mandiri</option>
                        <option value="Bank BCA">Bank BCA</option>
                        <option value="Bank BNI">Bank BNI</option>
                        <option value="Bank BRI">Bank BRI</option>
                        <option value="Bank Danamon">Bank Danamon</option>
                        <option value="Bank BJB">Bank BJB</option>
                    </select>
                </p>
                <input type="submit" value="Simpan Perubahan" class="red_btn"/>

            </div>
            <div class="five columns">


                <p> <b> Atas Nama </b><br/>
                    <input type="text" name="nama_nasabah" id="nama_nasabah" class="validate[required] text-input"/>
                </p>   
                <p> <b> Tujuan Transfer </b><br/>
                    <select name="tujuan_transfer" id="tujuan_transfer" class="validate[required] text-input">
                        <option value="">Pilih Nama Bank</option>
                        <option value="Bank Mandiri">Bank Mandiri</option>
                        <option value="Bank BCA">Bank BCA</option>
                    </select>
                </p>   
                <p> <b> Keterangan</b><br/>
                    <textarea rows="4" cols="30"></textarea>
                </p>

            </div>
        </form>
        <br/>
    </div>   
</div>
